<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <div id="app">
        
        <label>输入标题内容</label>
        <input type="text" v-model="msg">
        <button @click='isShow=!isShow'>{{isShow?'显示':'隐藏'}}</button><br>
        <h1 :title='title' :style='style' v-show='!isShow'>{{msg}}</h1>
        <button @click='btnClick($event)'>点击</button>
    </div>
    <script src="vue.js"></script>
    <script>
        var app = new Vue({
            el:'#app',
            data:{
                theme:'这是我的第一个app',
                title:'hello Vue',
                style:'color:red',
                isShow:false,
                msg:this.theme,
            },
            methods:{
                btnClick(event){
                    console.log(event)
                }
            }
        })
    </script>
</body>
</html>